HAL CEC migration: List of applicable concepts ¶
This section provides information about the HAL CEC applicable architecture concepts.
Concepts for CEC ¶
|
Concept |
Description |
|---|---|
|
The Init and the config have been split into two level functions:
|
|
|
Removal and conversion of init structure to configuration structure |
The init structure
|
|
The handle structure has been renamed to
|
|
|
The structure
|
|
|
|
|
|
New APIs are available to get and set CEC features. |
|
|
Two functions to set/get user data are available
|
|
|
Individual callback registration APIs replace global register and unregister functions |
The callback registration is handled by specific functions for each CEC event. These functions are used to register callback functions for different CEC events. |
|
Keep IRQ Handler without splitting.
Handle the CEC event and error interrupt requests with
|
|
|
HAL CEC APIs now rely on LL APIs rather than performing direct register access. |
|
|
Define statements and enumerations redirected to LL equivalents |
HAL CEC define statements and enumerations are based on LL define statements. |
|
All hardware macros have been removed from the HAL CEC driver, and equivalent services are ensured through the LL APIs. |
|
|
The CEC is now managed by six states:
|
|
|
The HAL CEC functions were updated to return:
|
|
|
A dedicated function for error management has been added:
|
|
|
All TypeDef parts of the HAL CEC driver have been removed and replaced by
|
|
|
Const keywords have been added to non-modifiable pointers to ensure that either the pointer itself or the data it points to cannot be modified. This enhances code safety and readability, prevents unintended modifications, and renders code more robust and maintainable. |
|
|
The parameters and state are checked using
|
|
|
Provide RTOS-compatible acquire/release bus services for communication peripheral drivers. |
New
|
|
Add HAL PPP Services for Drivers with Handle to Retrieve Corresponding Peripheral Clock Frequency. |
HAL CEC provides a new API to retrieve clock frequency
|
|
Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels. |
Finite parameters (including CEC instances) have been converted into enumerated types (enums) at HAL level. This improves code readability, maintainability, and type safety. |
|
In HAL2, the implementation of
|
|
|
Add HAL_PPP Prefix to All HAL Peripheral APIs (Defines, Macros, Types, and Functions). |
HAL CEC resources and data structure start with the prefix
|
Other HAL CEC changes ¶
|
Concept |
Consideration |
|---|---|
|
Introduce LL driver |
In HAL2, new LL driver has been provided. |
|
Introduce new APIs |
Add the functions
|
|
Rework RX buffer setting API |
The RX buffer setting API has been renamed from
|
|
Introduce dedicated polling-mode APIs for both RX and TX operations |
Add the
|